package com.ly.heart.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ly.common.core.domain.BaseVo;

import java.util.Date;
import java.util.List;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 光伏材料/逆变器/组件销售合同
 * </p>
 *
 * @author WuZH
 * @since 2024-05-15
 */
@Getter
@Setter
@TableName ( "erp_contract_sale_info" )
@ApiModel ( value = "光伏材料/逆变器/组件销售合同", description = "光伏材料/逆变器/组件销售合同" )
public class ContractSaleEntity extends BaseVo {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty ( "id" )
    @TableId ( value = "id", type = IdType.INPUT )
    private String id;

    @ApiModelProperty ( "合同名称" )
    @TableField ( "contract_name" )
    private String contractName;

    @ApiModelProperty ( "部门/子公司Id" )
    @TableField ( "dept_id" )
    private String deptId;

    @ApiModelProperty ( "父级Id，当发现合同变更时需要父级Id" )
    @TableField ( "parent_id" )
    private String parentId;

    @ApiModelProperty ( "合同编号" )
    @TableField ( "contract_number" )
    private String contractNumber;

    @ApiModelProperty ( "合同金额" )
    @TableField ( "money" )
    private String money;

    @ApiModelProperty ( "合同金额大写" )
    @TableField ( "money_upper" )
    private String moneyUpper;

    @ApiModelProperty ( "签约地点" )
    @TableField ( "sign_address" )
    private String signAddress;

    @ApiModelProperty ( "甲方名称/关联客户Id" )
    @TableField ( "customer_id" )
    private String customerId;

    @ApiModelProperty ( "销售部门" )
    @TableField ( "sale_dept_id" )
    private String saleDeptId;

    @ApiModelProperty ( "乙方名称" )
    @TableField ( "party_b_name" )
    private String partyBName;

    @ApiModelProperty ( "结算类型;固定下拉选择;1:款到发货,2:货到付款" )
    @TableField ( "settlement_mode" )
    private Integer settlementMode;

    @ApiModelProperty ( "结算方式;" )
    @TableField ( "settlement_type_id" )
    private String settlementTypeId;

    @ApiModelProperty ( "关联收款账户;销售方银行账户" )
    @TableField ( "collecting_account_id" )
    private String collectingAccountId;

    @ApiModelProperty ( "发(提)货时间,合同生效且收到全款后几天内发提货;光伏材料/逆变器合同拥有该字段" )
    @TableField ( "delivery_time" )
    private Integer deliveryTime;

    @ApiModelProperty ( "签订合同后几天内付全款;组件合同拥有该字段" )
    @TableField ( "pay_day" )
    private Integer payDay;

    @ApiModelProperty ( "乙方收到全款后几天内发货;组件合同拥有该字段" )
    @TableField ( "delivery_day" )
    private Integer deliveryDay;

    @ApiModelProperty ( "交货方式;1:由乙方包运，运费由乙方承担;2:甲方自提货物，交货地点为乙方合肥仓库;3:乙方代为联系物流，运费由甲方承担" )
    @TableField ( "delivery_type" )
    private Integer deliveryType;

    @ApiModelProperty ( "补充条款" )
    @TableField ( "supplementary_clauses" )
    private String supplementaryClauses;

    @ApiModelProperty ( "法定或授权代表人" )
    @TableField ( "legal_person" )
    private String legalPerson;

    @ApiModelProperty ( "签订日期" )
    @TableField ( "sign_time" )
    @JsonFormat ( pattern = "yyyy-MM-dd" )
    private Date signTime;

    @ApiModelProperty ( "税率" )
    @TableField ( "tax_rate" )
    private String taxRate;

    @ApiModelProperty ( "票据类型;1:专票;2:普票" )
    @TableField ( "bill_type" )
    private Integer billType;

    @ApiModelProperty ( "关联合同模板Id" )
    @TableField ( "contract_temp_id" )
    private String contractTempId;

    @ApiModelProperty ( "合同文本内容" )
    @TableField ( "contract_content" )
    private String contractContent;

    @ApiModelProperty ( "保证金比例" )
    @TableField ( "bond_ratio" )
    private String bondRatio;

    @ApiModelProperty ( "是否含税；1：是；2：否" )
    @TableField ( "is_include_tax" )
    private Integer isIncludeTax;

    @ApiModelProperty ( "是否价外税；1：是；2：否" )
    @TableField ( "is_extra_price_tax" )
    private Integer isExtraPriceTax;

    @ApiModelProperty ( "价目表" )
    @TableField ( "price_list_id" )
    private String priceListId;

    @ApiModelProperty ( "收款条件" )
    @TableField ( "receipt_terms_id" )
    private String receiptTermsId;

    @ApiModelProperty ( "结算币别" )
    @TableField ( "settlement_currency_id" )
    private String settlementCurrencyId;

    @ApiModelProperty ( "合同总金额本位币" )
    @TableField ( "total_amount_currency" )
    private String totalAmountCurrency;

    @ApiModelProperty ( "保证金" )
    @TableField ( "bond_amount" )
    private String bondAmount;

    @ApiModelProperty ( "本位币，默认人民币" )
    @TableField ( "standard_currency" )
    private String standardCurrency;

    @ApiModelProperty ( "汇率类型" )
    @TableField ( "rate_type" )
    private String rateType;

    @ApiModelProperty ( "汇率" )
    @TableField ( "rate" )
    private String rate;

    @ApiModelProperty ( "关联保证金" )
    @TableField ( "relation_bond" )
    private String relationBond;

    @ApiModelProperty ( "关联退款保证金" )
    @TableField ( "relation_refund_bond" )
    private String relationRefundBond;

    @ApiModelProperty ( "合同类型;1:光伏材料销售合同;2:逆变器销售合同;3:组件销售合同" )
    @TableField ( "type" )
    private Integer type;

    @ApiModelProperty ( "有效起始日期" )
    @TableField ( "start_valid_time" )
    @JsonFormat ( pattern = "yyyy-MM-dd" )
    private Date startValidTime;

    @ApiModelProperty ( "有效结束日期" )
    @TableField ( "end_valid_time" )
    @JsonFormat ( pattern = "yyyy-MM-dd" )
    private Date endValidTime;

    @ApiModelProperty ( "销售员" )
    @TableField ( "sale_user_id" )
    private String saleUserId;

    @ApiModelProperty ( "销售组织" )
    @TableField ( "sale_company_id" )
    private String saleCompanyId;

    @ApiModelProperty ( "合同有效期(天)" )
    @TableField ( "valid_day" )
    private Integer validDay;

    @ApiModelProperty ( "销售合同类型，1：普通合同；2：金额合同；3：物料分组合同；4：框架合同" )
    @TableField ( "sale_type" )
    private Integer saleType;

    @ApiModelProperty ( "流程状态" )
    @TableField ( "state" )
    private String state;

    @ApiModelProperty ( "实例id" )
    @TableField ( "instance_id" )
    private String instanceId;

    @ApiModelProperty ( "是否变更；1：是；否" )
    @TableField ( "is_change" )
    private Integer isChange;

    @ApiModelProperty ( "是否关闭，1：是；2：否;" )
    @TableField ( "is_close" )
    private Integer isClose;

    @ApiModelProperty ( "是否作废" )
    @TableField ( "is_cancel" )
    private Integer isCancel;

    @ApiModelProperty ( "创建人" )
    @TableField ( "create_by" )
    private String createBy;

    @ApiModelProperty ( "新增时间" )
    @TableField ( "create_time" )
    private Date createTime;

    @ApiModelProperty ( "更新人" )
    @TableField ( "update_by" )
    private String updateBy;

    @ApiModelProperty ( "更新时间" )
    @TableField ( "change_time" )
    private Date changeTime;

    @ApiModelProperty ( "是否可用" )
    @TableField ( "is_used" )
    private Integer isUsed;

    @ApiModelProperty ( "备注" )
    @TableField ( "remarks" )
    private String remarks;

    @ApiModelProperty ( "审批人姓名" )
    @TableField ( exist = false )
    private String createUser;

    @ApiModelProperty ( "是否关闭名称" )
    @TableField ( exist = false )
    private String isCloseName;

    @ApiModelProperty ( "是否作废名称" )
    @TableField ( exist = false )
    private String isCancelName;

    @TableField ( exist = false )
    private String contractTempName;

    @TableField ( exist = false )
    private List<FileEntity> fileEntities;

    @ApiModelProperty ( "业务type" )
    @TableField ( exist = false )
    private String businessType;

    @ApiModelProperty ( "流程模型id" )
    @TableField ( exist = false )
    private String modelId;

    @ApiModelProperty ( "物料名称" )
    @TableField ( exist = false )
    private String materialName;

    @ApiModelProperty ( "物料编码" )
    @TableField ( exist = false )
    private String materialCode;

    @ApiModelProperty ( "客户名称" )
    @TableField ( exist = false )
    private String customerName;

    @ApiModelProperty ( "结算方式名称" )
    @TableField ( exist = false )
    private String settlementTypeName;

    @ApiModelProperty ( "收款条件名称" )
    @TableField ( exist = false )
    private String receiptTermsName;

    @ApiModelProperty ( "结算币别名称" )
    @TableField ( exist = false )
    private String settlementCurrencyName;

    @ApiModelProperty ( "销售员名称" )
    @TableField ( exist = false )
    private String saleUserName;

    @ApiModelProperty ( "销售部门名称" )
    @TableField ( exist = false )
    private String saleDeptName;

    @ApiModelProperty ( "销售价目表名称" )
    @TableField ( exist = false )
    private String priceListName;

    @ApiModelProperty ( "销售组织" )
    @TableField ( exist = false)
    private String saleCompanyName;

}
